package com.company.algo.debugUtils;

import com.company.algo.pojo.ListNode;

import java.util.Arrays;

public class DebugUtils {
    public static void printMatrix(int[][] matrix){
        for (int i = 0; i < matrix.length; i++) {
            System.out.println(Arrays.toString(matrix[i]));
        }
    }
    public static void printListNode(ListNode head){
        StringBuilder sb = new StringBuilder();
        while (head!=null){
            sb.append(head.val).append("->");
            head = head.next;
        }
        sb.delete(sb.length()-2,sb.length());
        System.out.println(sb.toString());
    }
}
